﻿#region Copyright information
// <copyright file="MathView.xaml.cs">
//     Licensed under Microsoft Public License (Ms-PL)
//     http://mathview.codeplex.com/license
// </copyright>
// <author>Uwe Mayer</author>
#endregion

using System.Windows.Markup;

[assembly: XmlnsDefinition("http://mathview.codeplex.com", "mathview.View")]

namespace mathview.View
{
    using mathview.Expressions;
    using System.ComponentModel;
    using System.Windows;
    using System.Windows.Controls;

    /// <summary>
    /// Interaction logic for MathView.xaml
    /// </summary>
    public partial class MathView : UserControl
    {
        #region Source Property
        /// <summary>
        /// The Source.
        /// </summary>
        public static DependencyProperty SourceProperty = DependencyProperty.Register("Source", typeof(ExpressionBase), typeof(MathView), new PropertyMetadata(null));

        /// <summary>
        /// The backing property for <see cref="MathView.SourceProperty"/>
        /// </summary>
        [Category("Common")]
        public ExpressionBase Source
        {
            get { return (ExpressionBase)GetValue(SourceProperty); }
            set { SetValue(SourceProperty, value); }
        } 
        #endregion

        #region ItalicLetters Property
        /// <summary>
        /// Controls the usage of italic letters.
        /// </summary>
        public static DependencyProperty ItalicLettersProperty = DependencyProperty.Register("ItalicLetters", typeof(bool), typeof(MathView), new PropertyMetadata(true));

        /// <summary>
        /// The backing property for <see cref="MathView.ItalicLettersProperty"/>
        /// </summary>
        [Category("Common")]
        public bool ItalicLetters
        {
            get { return (bool)GetValue(ItalicLettersProperty); }
            set { SetValue(ItalicLettersProperty, value); }
        } 
        #endregion

        /// <summary>
        /// Creates a new <see cref="MathView"/> instance.
        /// </summary>
        public MathView()
        {
            InitializeComponent();
        }
    }
}
